#!/bin/bash

       if cat /proc/cpuinfo | egrep AMD | egrep K6 && cat /proc/cpuinfo | egrep "cpu family" | egrep "5" && cat /proc/cpuinfo | egrep "model" | egrep "\b(8|13)\b"
       then
	apt-get install -y --force-yes swiftfox-k6-2	       
       elif cat /proc/cpuinfo | egrep AMD && cat /proc/cpuinfo | egrep "cpu family" | egrep "6" && cat /proc/cpuinfo | egrep "model" | egrep "\b(2|3|4)\b"
       then
	apt-get install -y --force-yes swiftfox-athlon
       elif cat /proc/cpuinfo | egrep AMD && cat /proc/cpuinfo | egrep "cpu family" | egrep "6" && cat /proc/cpuinfo | egrep "model" | egrep "\b(6|7|8|10)\b"
       then
	apt-get install -y --force-yes swiftfox-athlon-xp
       elif cat /proc/cpuinfo | egrep AMD && cat /proc/cpuinfo | egrep "cpu family" | egrep "15"
       then
	apt-get install -y --force-yes swiftfox-athlon64
       elif cat /proc/cpuinfo | egrep Intel && cat /proc/cpuinfo | egrep "cpu family" | egrep "6" && cat /proc/cpuinfo | egrep "model" | egrep "\b(7|8|9|10|11)\b"
       then
	apt-get install -y --force-yes swiftfox-pentium3
       elif cat /proc/cpuinfo | egrep Intel && cat /proc/cpuinfo | egrep "cpu family" | egrep "15" && cat /proc/cpuinfo | egrep "model" | egrep "\b(0|1|2|3|4|6)\b"
       then
	apt-get install -y --force-yes swiftfox-pentium4
       elif cat /proc/cpuinfo | egrep Intel && cat /proc/cpuinfo | egrep "cpu family" | egrep "6" && cat /proc/cpuinfo | egrep "model" | egrep "\b(9|13|14)"
       then
	apt-get install -y --force-yes swiftfox-pentium-m	
       else
       AX_fatal "Swiftfox is not available for your CPU architecture or your required version has not been included in Hakix. Check www.getswiftfox.com";
       fi
